package com.woniu.mapper;

import com.woniu.pojo.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GoodsMapper {
    //增加
    public  void  addGoods(Goods goods);
    //删除
    public  void  deleteGoods(@Param("name") String name);
    //修改
    public  void  updateGoods(int id);
    //查询所有
    public List<Goods>  findAllGoods();
    //模糊查询 价格888.8以上
//    public List<Goods>  findGoodsByNameAndPrice(String  name,double minprice,double maxprice); arg0 arg1 arg2/prarm1 2 3

    public List<Goods>  findGoodsByNameAndPrice(@Param("name") String name,@Param("minprice") double minprice,@Param("maxprice") double maxprice);

    public List<Goods>  findGoodsByNameAndPrice(Map<String ,Object> map);

    public List<Goods>  findGoodsBySort(@Param("price")String price,@Param("sort") String sort);

    public List<Goods>  findGoodsByView(@Param("view") String  view);
}
